package servlet.listener.application;

import javax.servlet.ServletContextEvent;

public class ServletContextListener implements javax.servlet.ServletContextListener {

    public ServletContextListener() {
    	
    }
    
    public void contextInitialized(ServletContextEvent sce) {
    	System.out.println("启动鸟----容器启动时触发~~~~" + sce.getSource().toString() + ";" + sce.getServletContext().getContextPath());
    	
    }
    
    public void contextDestroyed(ServletContextEvent sce) {
    	try {
    		Thread.sleep(6000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
    	System.out.println("关闭鸟----容器关闭时触发~~~~");
    }
	
}
